<div class="modal-content">
    <div class="modal-header">
        <button type="button" class="close"
                data-dismiss="modal" aria-hidden="true" ng-click="cancel()">
            ×
        </button>
        <h4 class="modal-title" id="myModalLabel">
            <span translate="HomePage.EditWebPart">编辑部件</span>
        </h4>
    </div>
    <div class="modal-body">
        <form class="bs-example form-horizontal">
            <ul class="nav nav-tabs" id="StepTab">
                <li class="active">
                    <a href="#public"><span translate="HomePage.PublicProperty">公共属性</span></a>
                </li>
                <li>
                    <a href="#part"><span translate="HomePage.PartProperty">部件属性</span></a>
                </li>
            </ul>
            <div class="tab-content">
                <div class="tab-pane active panel-body" id="public">
                    <div class="row">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label" style="text-align:center;" translate="HomePage.Title">标题</label>
                                <div class="col-sm-8 control-label alignLeft">
                                    <input ng-model="Title" type="text" class="form-control">
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label" style="text-align:center;" translate="HomePage.TitleIcon">标题图标</label>
                                <div class="col-sm-8 control-label alignLeft">
                                    <input ng-model="TitleIcon" type="text" class="form-control">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label" style="text-align:center;" translate="HomePage.FunctionCode">权限编码</label>
                                <div class="col-sm-8 control-label alignLeft">
                                    <input ng-model="FunctionCode" type="text" class="form-control">
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label" style="text-align:center;" translate="HomePage.Height">高度</label>
                                <div class="col-sm-8 control-label alignLeft form-inline">
                                    <input ng-model="Height" type="number" min="0" onkeyup="value=value.replace(/[^\d]/g,'')" class="form-control">
                                    <select ng-model="HeightUnit" class="form-control">
                                        <option value="px" ng-selected="true">px</option>
                                        <!-- <option value="%">%</option> -->
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label" style="text-align:center;" translate="HomePage.CssName">css样式</label>
                                <div class="col-sm-8 control-label alignLeft">
                                    <input ng-model="CssName" type="text" class="form-control">
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label" style="text-align:center;" translate="HomePage.TitleVisible">显示标题栏</label>
                                <div class="col-sm-8 control-label alignLeft">
                                    <label class="i-checks" style="margin-top:6px;">
                                        <input ng-model="TitleVisible"
                                               type="radio" name="TitleVisible" value="1"><i></i>
                                        <label translate="HomePage.Show">显示</label>
                                    </label>
                                    <label class="i-checks">
                                        <input ng-model="TitleVisible"
                                               type="radio" name="TitleVisible" value="0"><i></i>
                                        <label translate="HomePage.Hide">隐藏</label>
                                    </label>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-12">
                            <div class="form-group">
                                <label class="col-sm-2 control-label" style="text-align:center;" translate="HomePage.WebPartType">部件类型</label>
                                <div class="col-sm-10 control-label alignLeft">
                                    <label class="col-md-10">
                                        <label class="checkbox-inline i-checks" ng-repeat="AllWebPart in AllWebParts">
                                            <input type="radio" name="PartTypeRadio" value="{{AllWebPart.Value}}"
                                                   ng-model="WebPartID" ng-click="WebPartIDChange('{{AllWebPart.Value}}')"
                                                   ng-disabled="!IsNewWebPart"><i></i>{{AllWebPart.Text}}
                                        </label>
                                    </label>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="tab-pane" id="part">
                    <!-- Ascx Start -->
                    <div ng-show="PartType=='Ascx'" class="panel-body">
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label" style="text-align:center;" translate="HomePage.ControlPath">控件路径[基于本站]</label>
                                    <div class="col-sm-7 control-label alignLeft">
                                        <input ng-model="ControlPath" type="text" class="form-control">
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label" style="text-align:center;" translate="HomePage.MoreLink">更多链接</label>
                                    <div class="col-sm-7 control-label alignLeft">
                                        <input ng-model="MoreLink" type="text" class="form-control">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label" style="text-align:center;" translate="HomePage.MoreLinkText">更多链接文字</label>
                                    <div class="col-sm-7 control-label alignLeft">
                                        <input ng-model="MoreText" type="text" class="form-control">
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label" style="text-align:center;" translate="HomePage.MoreLinkPost">更多链接位置</label>
                                    <div class="col-sm-7 control-label alignLeft">
                                        <select ng-model="MorePos" class="form-control">
                                            <option value="br" ng-selected="true">
                                                {{'HomePage.ButtomRight'|translate}}
                                                <!--底部右侧-->
                                            </option>
                                            <option value="bl">
                                                {{'HomePage.ButtomLeft'|translate}}
                                                <!--底部左侧-->
                                            </option>
                                            <option value="tr">
                                                {{'HomePage.TitleRight'|translate}}
                                                <!--标题右侧-->
                                            </option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- Ascx End -->
                    <!-- DataModel Start -->
                    <div ng-show="PartType=='DataModel'" class="panel-body">
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label" style="text-align:center;" translate="BizObjectSchemaAssociation.Mode">数据模型</label>
                                    <div class="col-md-8">
                                        <div ui-jq="SheetWorkflow" ui-options="WorkflowOptions"
                                             id="sheetWorkflow" class="input-group"></div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label" style="text-align:center;" translate="HomePage.ShowNum">显示记录数</label>
                                    <div class="col-sm-8 control-label alignLeft">
                                        <input ng-model="ShowCount" type="number" min="1" class="form-control"
                                        	 onkeyup="value=value.replace(/[^\d]/g,'')">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label" style="text-align:center;" translate="HomePage.QueryCode">查询编码</label>
                                    <div class="col-sm-8 control-label alignLeft">
                                        <input ng-model="QueryCode" type="text" class="form-control">
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label" style="text-align:center;" translate="HomePage.OrderBy">排序</label>
                                    <div class="col-sm-8 control-label alignLeft">
                                        <input ng-model="SortBy" type="text" class="form-control">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label" style="text-align:center;" translate="ReportTemplate.LinkRule">链接规则</label>
                                    <div class="col-sm-8 control-label alignLeft">
                                        <input ng-model="LinkFormat" type="text" class="form-control">
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label" style="text-align:center;" translate="HomePage.MoreLink">更多链接</label>
                                    <div class="col-sm-8 control-label alignLeft">
                                        <input ng-model="MoreLink" type="text" class="form-control">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label" style="text-align:center;" translate="HomePage.MoreLinkText">更多链接文字</label>
                                    <div class="col-sm-8 control-label alignLeft">
                                        <input ng-model="MoreText" type="text" class="form-control">
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label" style="text-align:center;" translate="HomePage.MoreLinkPost">更多链接位置</label>
                                    <div class="col-sm-7 control-label alignLeft">
                                        <select ng-model="MorePos" class="form-control">
                                            <option value="br" ng-selected="true">
                                                {{'HomePage.ButtomRight'|translate}}
                                                <!--底部右侧-->
                                            </option>
                                            <option value="bl">
                                                {{'HomePage.ButtomLeft'|translate}}
                                                <!--底部左侧-->
                                            </option>
                                            <option value="tr">
                                                {{'HomePage.TitleRight'|translate}}
                                                <!--标题右侧-->
                                            </option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label" style="text-align:center;" translate="HomePage.BindAttr">绑定属性</label>
                                    <div class="col-sm-10 control-label">
                                        <!--表格部分Star-->
                                        <table class="table m-b-none">
                                            <tr>
                                                <th style="width:20%;">
                                                    <span translate="HomePage.AttrName">属性名称</span>
                                                </th>
                                                <th style="width:10%;">
                                                    <span translate="HomePage.CharacterNum">字符数</span>
                                                </th>
                                                <th style="width:30%;">
                                                    <span translate="HomePage.DisplayFormat">显示格式(Java语法，如{yyyy-MM-dd HH:mm:ss})</span>
                                                </th>
                                                <th style="width:10%;">
                                                    <span></span>
                                                </th>
                                            </tr>
                                            <tr ng-repeat="DataField in BindDataFields">
                                                <th>
                                                    <select ng-model="DataField.AttrName" class="form-control"
                                                            ng-options="Workflow.Value as Workflow.Text for Workflow in WorkflowItems"></select>
                                                </th>
                                                <th>
                                                    <input ng-model="DataField.Len" type="number" min="0"
                                                    	onkeyup="value=value.replace(/[^\d]/g,'')" class="form-control">
                                                </th>
                                                <th>
                                                    <input ng-model="DataField.Format" type="text" class="form-control">
                                                </th>
                                                <th class="dodgerblue">
                                                    <a ng-click="RemoveBindDataField($index)"><span translate="HomePage.Remove">移除</span></a>
                                                </th>
                                            </tr>
                                        </table>
                                        <a ng-click="AddBindDataField()" style="float:left;"><span translate="HomePage.AddRow">增加一行</span></a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- DataModel End -->
                    <!-- Static Start -->
                    <div ng-show="PartType=='Static'" class="panel-body">
                        <div class="row">
                            <div class="col-sm-12" style="">
                                <textarea ng-model="StaticHtml" id="StaticHtml" class="ckeditor" data-init="true"
                                          style="width: 100%; height: 209px;"></textarea>
                            </div>
                        </div>
                    </div>
                    <!-- Static End -->
                    
                    <!-- Report Start -->
                    <div ng-show="PartType=='Report'" class="panel-body" id="report">
                        <div class="row">
                            <div class="col-sm-12">
                             <div class="form-group" style="position:relative;">
                             	<td><span style="position: absolute;top: 5px;left: 160px;font-size: 15px;font-weight: bold;">选择报表：</span></td>
	                            <td style="width: 154px; text-align: left">  
	                                <input type="text" id="Code" style="width:100%;"/>	
	                                <!--<select id="ddlReportCode" v-model="FunctionNode.FunctionUrl.ReportCode" style="width:155px" v-on:change="selectChange">
	                                    <option v-for="option in ReportCode" v-bind:value="option.Value">{{option.Text}}</option>
	                                 </select>-->
	                            </td>  
                            </div>
                            </div>
                        </div>
                    </div>
                    <!-- Report End -->
                    
                    
 
                    <!-- Tips Start -->
                    <div ng-show="PartType==''" class="panel-body">
                        <div class="row">
                            <div class="col-sm-12" style="text-align:center;color:red;">
                                <span translate="HomePage.NotSelectWebPartType">未选择部件类型</span>
                            </div>
                        </div>
                    </div>
                    <!-- Tips End -->
                </div>
            </div>
        </form>
    </div>
    <div class="modal-footer">
        <button type="button" id="saveWebPart" class="btn btn-primary" ng-click="save()"
                ng-disabled="!WebPartID" translate="EditGlobalData.Button_Save">
            保存
        </button>
    </div>
</div>